﻿using FluentNHibernate.Mapping;
using CsharpTrainer.NHibernate3.Entities;

namespace CsharpTrainer.NHibernate3.Mapping
{
    public class ArticleMap : ClassMap<Article>
    {
        public ArticleMap()
        {
            Id(x => x.ArticleId, "ArticleId");
            Map(x => x.Name)
                .Length(200)
                .Not.Nullable();
            References(x => x.Category, "CategoryId");
        }
    }
}
